<!-- 试复样管理-->
<template>
  <div class="main-container" id="main-container">
    <div class="bg-container">
      <div class="my-header" id="TrialDupSampleRegisterList">
        <a-row justify="space-between">
          <a-col flex="200px">
            <a-button :type="dupSelectStatus === 0 ? 'primary' :'outline'" style="margin-right: 20px" @click="changeStatus(0)">试复样情况</a-button>
            <a-button :type="dupSelectStatus === 1 ? 'primary' :'outline'" @click="changeStatus(1)">回修</a-button>
          </a-col>
        </a-row>
      </div>
    </div>
    <!-- 试复样登记  -->
     <testDupSamples v-if="dupSelectStatus === 0"/>   
     <!-- 回修 -->
     <correction v-if="dupSelectStatus === 1"/>   
  </div>  
</template>   

<script lang="ts"> 
import { ref,defineComponent} from 'vue' 
import emitter from '@/hooks/useEventBus' 
export default defineComponent({
  name: 'TrialDupSampleRegisterList',   
  setup() {
    const dupSelectStatus = ref(0); 
   
    const changeStatus = (status:number) => {
        dupSelectStatus.value = status;
        emitter.emit('window-change'); 
        if(status === 0){
            emitter.emit('refresh-testDupSamples')
        }else if(status === 1){
            emitter.emit('refresh-correction')
        }
    };   
    return {
      dupSelectStatus,
      changeStatus
    }
  },
})
</script>
 
<style lang="less" scoped>
.main-container {
  height: 100%;
  /* overflow-y: auto; */
}
</style>